package com.fqh.controller;

import com.fqh.entity.Fooddetail;
import com.fqh.service.FoodDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Scope(value = "prototype")
@RestController
public class FoodDetailController {

    @Autowired
    private FoodDetailService foodDetailService;

    @RequestMapping("/findAllCaiByType.do")
    public List findAllCaiByType(@RequestParam("type") Integer id) {
        List<Fooddetail> list = foodDetailService.findAllCaiByType(id);
        return list;
    }
}
